﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Jemgine.Particles.Modifiers
{
    public class ScaleLerp : Modifier
    {
        public float StartScale { get; set; }
        public float EndScale { get; set; }

        public ScaleLerp()
        {
            StartScale = 0.0f;
            EndScale = 1.0f;
        }

        internal override void Apply(ref Particle _particle, Emitter _emitter, float ElapsedSeconds)
        {
            float ScaleStep = (EndScale - StartScale) / (_emitter.ParticleLifetime);
            _particle.scale = StartScale + (_particle.age * ScaleStep);
        }
    }
}
